package cc.idoone.joddhttp.demo;

import jodd.http.net.SocketHttpConnectionProvider;

import javax.net.SocketFactory;
import java.io.IOException;
import java.net.Socket;

/**
 * @author hemj
 * @version 2017/8/1
 */
public class MyConnectionProvider  extends SocketHttpConnectionProvider {
    @Override
    protected Socket createSocket(String host, int port, int connectionTimeout)
            throws IOException {
        Socket socket = super.createSocket(host, port, connectionTimeout);
        socket.setSoTimeout(1000);
        return socket;
    }
}